package org.atovio.eh.controller;

import org.atovio.eh.pojo.Order;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author AtoVio, Winter Yuan
 */
@RestController
public class OrderController {

    @PostMapping("/orders")
    public String addOrder(@Validated @RequestBody Order order) {
        return "订单信息： " + order.toString();
    }
}
